package test.com.itheima.jdbc; 

import junit.framework.Test; 
import junit.framework.TestSuite; 
import junit.framework.TestCase;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.jdbc.core.JdbcTemplate;

/** 
* AccountDaoImpl Tester. 
* 
* @author <Authors name> 
* @since <pre>04/10/2019</pre> 
* @version 1.0 
*/ 
public class AccountDaoImplTest extends TestCase { 
public AccountDaoImplTest(String name) { 
super(name); 
} 

public void setUp() throws Exception { 
super.setUp(); 
} 

public void tearDown() throws Exception { 
super.tearDown(); 
} 

/** 
* 
* Method: setJdbcTemplate(JdbcTemplate jdbcTemplate) 
* 
*/ 
public void testSetJdbcTemplate() throws Exception { 
//TODO: Test goes here...
   ApplicationContext applicationContext=new ClassPathXmlApplicationContext("applicationContext.xml");
    JdbcTemplate jdTemplate=(JdbcTemplate) applicationContext.getBean("jdbcTemplate");
    jdTemplate.execute("create table account(id int primary key ,username varchar (50),balance double)");
    System.out.println("账户表创建成功！");
} 

/** 
* 
* Method: addAccount(Account account) 
* 
*/ 
public void testAddAccount() throws Exception { 
//TODO: Test goes here... 
} 

/** 
* 
* Method: updateAccount(Account account) 
* 
*/ 
public void testUpdateAccount() throws Exception { 
//TODO: Test goes here... 
} 

/** 
* 
* Method: deleteAccount(int id) 
* 
*/ 
public void testDeleteAccount() throws Exception { 
//TODO: Test goes here... 
} 



public static Test suite() { 
return new TestSuite(AccountDaoImplTest.class); 
} 
} 
